<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>03强制继承</title>
    <style>
        .box1 {
            height: 300px;
            width: 800px;
            padding: 30px;
            border: 1px solid;
        }

        .box2 {
            color: pink;
            height: 100px;
            width: 200px;
            /* 
                强制继承父类的边框
                这里只能继承亲父类，如果父类没有设置边框也继承过来

                父类没有边框，父类的父类有边框，是继承不过来的
            */
            border: inherit;
        }
    </style>
</head>

<body>
    <div class="box1">
        <!-- <div class="box3"> -->
        <div class="box2">我是子元素</div>
        <!-- </div> -->
    </div>
</body>

</html>